%%%%% --------------------------------------------------------------------------------
%%
%%%%***************************** Version Information ********************************
%%
%% Copyright (C) Hanlin Tan <hanlin_tan@nudt.edu.cn> 
%% This is free software: you can redistribute it and/or modify it
%% under the terms of the GNU General Public License as published by
%% the Free Software Foundation, either version 3 of the License, or
%% (at your option) any later version.
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{custom}
[2014/10/01 v0.1 custom 
macros package]
%%%%% --------------------------------------------------------------------------------
%%
%%%%******************************* Declare Options **********************************
%%
%% end-user parameters, each option is declared by one declare option command
\DeclareOption*{% handle non-implemented options
    \PackageWarning{custom}{Unknown option '\CurrentOption'}%
}
%% terminates all options processing
\ProcessOptions\relax
%%%%% --------------------------------------------------------------------------------
%%
%%%%************************** User Defined Command **********************************
%%
%%% >>> Notice
%% 
%% -- \newcommand: defines a new command, makes an error if already defined
%% -- \renewcommand: redefines a predefined command, makes an error if not yet defined
%% -- \providecommand: defines a new command, if already defined, keep old definition
%% -- \def: define a command whether new or predefined, equivalent to
%%          \providecommand{name}{}%
%%          \renewcommand{name}[number of arguments][default value]{definition}
%%
%%% >>> Math functions
%%
%% International standard layout rules (from isomath package)
%% -- The overall rule is that symbols representing math quantities or variables should
%%    be italicised, symbols representing units or labels are unitalicised (roman).
%% -- Symbols for vectors and matrices are bold italic, symbols for tensors are 
%%    sans-serif bold italic.
%% -- The above rules apply equally to letter symbols from the Greek and 
%%    the Latin alphabet.
%% -- More information may be found in <<The LaTeX Mathematics Companion>>
%% However, math typefaces vary from field to field. To keep consistent typography
%% and easy adaption, it it always best to create a corresponding command for 
%% variables in each math category.  
%\providecommand{\Scalar}[1]{#1}% Scalar is the normal math typeset, italic
\providecommand{\Vector}[1]{\boldsymbol{#1}}% General vectors in bold italic
%\renewcommand{\vec}[1]{\Vector{#1}}% redefine predefined vector if needed
\providecommand{\unitVector}[1]{\boldsymbol{\mathbf{#1}}}% Unit vectors in bold roman
\providecommand{\Tensor}[1]{\boldsymbol{\mathsf{#1}}}% Tensor in sans-serif bold italic
\providecommand{\unitTensor}[1]{\boldsymbol{{\mathsf{#1}}}}% Identity tensor in sans-serif bold
\providecommand{\Matrix}[1]{\boldsymbol{\mathbf{#1}}}% Matrix in bold roman
\providecommand{\unitMatrix}[1]{\boldsymbol{\mathbf{#1}}}% Identity matrix in bold roman
\providecommand{\Unit}[1]{\,\mathrm{#1}}% Units in roman
\providecommand{\Const}[1]{\mathrm{#1}}% Math constants, functions
\providecommand{\Set}[1]{\mathbb{#1}}% Special sets (e.g. real numbers) in blackboard bold
\providecommand{\Div}{\operatorname{div}}% divergence operator
\providecommand{\Order}{\operatorname{O}}% order operator
\providecommand{\Trace}{\operatorname{tr}}% trace operator
\providecommand{\Diag}{\operatorname{diag}}% diagonal
\providecommand{\Def}{\operatorname{def}}% define
\providecommand{\Max}{\operatorname{max}}% maximum
\providecommand{\Min}{\operatorname{min}}% minimum
\providecommand{\Loptr}{\operatorname{\mathcal{L}}}% spatial operator
\providecommand{\Toptr}{\operatorname{\mathcal{LL}}}% temporal operator
\providecommand{\Soptr}{\operatorname{\mathcal{S}}}% solution operator
%%
%%% >>> Graphic Length Factor
%%
\newcommand*{\MyFactor}{0.8}% for single figure
\newcommand*{\MySubFactor}{0.48}% for subfigure
%%
%%% >>> Nomenclature item
%%
\newcommand{\nomenclatureitem}[3][ ]{%
    \noindent\makebox[0.15\textwidth][l]{#2}{{#3}\hfill{#1}}\par
}
%%
%%% >>> Add content link to the table of content and bookmark
%%
%% define a macro for adding chapter/section title to toc and bookmark.
\newcommand{\intotoc}[2][chapter]{%
    \cleardoublepage% ensure correct page reference
    \markboth{\MakeUppercase{#2}}{}% set the leftmark
    \phantomsection% use for adobe bookmark.
    \addcontentsline{toc}{#1}{#2}% add content #2 to toc as #1
}
%%%%% --------------------------------------------------------------------------------
%%
%%%%**************************** User Configuration **********************************
%%
%%
%%% >>> Space and Skip
%%
%% Set line space in whole document by \linespread:
%\linespread{1.3}% 1.3 for "one and a half" line spacing, and 1.6 for "double" line spacing
%% skip distance for paragraphs
%\setlength{\parskip}{0.5ex plus 0.25ex minus 0.25ex}% vertical space before a paragraph.
%%
%%% >>> Toc Style
%%
\setcounter{tocdepth}{1}% specifies what depth to take the Table of Contents to.
\setcounter{secnumdepth}{3}% the depth for section numbering occurs, default is 2(subsub).
%%
%%% >>> Grouping Figure/Equation Numbering by Section, Numberwithin.
%%
%% For long documents the numbering can become cumbersome as the numbers
%% reach into double and triple digits. To reset the counters at the
%% start of each section and prefix the numbers by the section number
%% include the following in the preamble.
%% The same can be done with similar counter types and document units such as "subsection".
%%
%% Get enumeration at the section level:
%\numberwithin{equation}{section}
%\renewcommand{\theequation}{\thesection\arabic{equation}}% configure the label style.
%\numberwithin{figure}{section}
%\renewcommand{\thefigure}{\thesection\arabic{equation}}% configure the label style.
%%
%% Get enumeration at the subsection level:
%\numberwithin{equation}{subsection}
%\renewcommand{\theequation}{\thesubsection\arabic{equation}}% configure the label style.
%\numberwithin{figure}{subsection}
%\renewcommand{\thefigure}{\thesubsection\arabic{equation}}% configure the label style.
%%
%%% >>> URL Style
%%
%% By default, URLs are printed using mono-spaced fonts. If you don't like it and
%% you want them to be printed with the same style of the rest of the text, you can use this:
%\urlstyle{same}
%%%%% --------------------------------------------------------------------------------
\endinput
%% End of file
%%%%% --------------------------------------------------------------------------------
